package com.jdiv.samples.full;

import java.awt.Color;

import com.jdiv.JDiv;
import com.jdiv.JProgram;

/**
 * @author  Joyal
 */
public class Main extends JProgram {

	public static int 
	       fpg_full;

	public static int fnt_morado;
	
	private boolean fullS=false;
	
	/**
	 * @uml.property  name="tapa"
	 * @uml.associationEnd  
	 */
	public static Tapa tapa;
	
	public Main(){
		
		JDiv.set_title("JDiv Test 8 - Full Throttle");
		                      //Blanco medio rosado xD
		JDiv.setMaskColor(new Color(255,236,232));
								//Fucsia                  Marron
		JDiv.replaceColor(new Color(255,85,248),new Color(123,89,57));

		JDiv.set_mode(JDiv.m320x200);
		//Escalado 2x
		JDiv.scale_mode(JDiv.SCALENORMAL2X);
		fpg_full=JDiv.load_fpg("res/fpg/full.fpg");
	    fnt_morado=JDiv.load_fnt("res/fnt/rata.fnt");
	    
		tapa=new Tapa();
		new Intro();
	     
	}
	
	public void loop(){
		//Salir
		if (JDiv.key(JDiv._ESC)) JDiv.exit(0);
		//FullScreen
		if (JDiv.key(JDiv._F)){
			if (!fullS){ JDiv.fullScreen(true); fullS=true;
			}else{  JDiv.fullScreen(false); fullS=false;}
		}
			
		//Scale
		if (JDiv.key(JDiv._1)) JDiv.scale_mode(JDiv.SCALENORMAL);
		if (JDiv.key(JDiv._2)) JDiv.scale_mode(JDiv.SCALENORMAL2X);
	}
	
	public static void main(String args[]){
		Main m=new Main();
	}
}
